Readme for Aastveit, K.A., Bj�rnland H.C. and Cross, J.L. (2021). 
Inflation expectations and the pass-through of oil prices, 
Review of Economics and Statistics, forthcoming.

[1] Replication files
The main runfile is "main_ABC.m". There are 3 folders:
1-"data" contains the dataset
2-"utilities" contains the functions - each function is explained in their respective .m file 
3-"figures" contains the full set of figures presented in the paper

The results can be replicated by running "main_ABC.m" by selecting the model specification on line 23 of "main_ABC.m":
spec = 1 is the main specification
spec = 2 is the robustness with median inflation expectations
spec = 3 is the robustness with mixture prior on the elasticity of supply

The results will be stored in the respective folders:
1-"results_main" replicates the main results
2-"results_robust_medIE" replicates the robustness results using median inflation expectations
3-"results_robust_mix" replicates the robustness results using the mixture prior on the elasticity of supply

When replicating the main results "main_ABC.m" first generates a set of MCMC draws (or loads stored results in the above folders).
Given these draws, the results in the paper are obtained with the following files:
-Figure 1 is generated using "figure_posteriors.m"
-Figures 2 and 4 are generated by first calculating the actual and counterfactual impulse response functions using "figure_IRFs_compute.m" and then plotting them using "figure_IRFs_plot_inf" and "figure_IRFs_plot_CF"
-Figure 3 is generated by first calculating the historical decompositions using "figure_HDECs_compute.m" and then plotting them using "figure_HDECs_plot"
-Figure 5 is generated by first calculating the counterfactual time series using "figure_IRFs_compute.m" and then plotting them using "figure_GR_CF"

The replication files also produce all of the results in the Online Appendix as follows:
-Figures A1 and A2 are generated in the same way as Figure 3
-Figure A3 is generated in the same way as Figure 3
-The P-values for one-sided two-sample Kolmogorov-Smirnov test on actual and counterfactual impulse response functions of CPI Inflation in Table A2 are computed using "KStests.m"
-Figure A4 is generated in the same way as Figure 1
-Figure A5 is generated by first calculating the impulse response functions using "figure_IRFs_compute.m" and then plotting them using "figure_IRFs_plot_oil"
-Figure A6 is generated in the same way as Figure 3
-Figure A7 and Table A3 are generated using the function "convergence_diagnostics.m"
-Figure A8 is generated in the same way as Figure 4 using "spec = 2" on line 23 of "main_ABC.m"
-Figure A9 is generated in the same way as Figure 5 using "spec = 2" on line 23 of "main_ABC.m"
-Figure A10 is generated in the same way as Figure 4 using "spec = 3" on line 23 of "main_ABC.m"
-Figure A11 is generated in the same way as Figure 5 using "spec = 3" on line 23 of "main_ABC.m"
-Figures A12 and A13 are generated in the same way as Figure 5

[2] Data
All of the data can be found in the folder called "data". The model used data on six observable time series.
The four oil market time series are in the file "data_BH_AER2019.xlsx" 
	They were downloaded from Christiane Baumeister's personal website: https://sites.google.com/site/cjsbaumeister/research
	The transformations are on lines 84-87 of "main_ABC.m"

The actual inflation series was created from the "Consumer Price Index for All Urban Consumers: All Items in U.S. City Average" (Series ID: CPIAUCSL)
	The CPI series is in the file "CPIAUCSL.xlsx" 
	The series was downloaded from the FRED database: https://fred.stlouisfed.org/series/CPIAUCSL
	The transformation from CPI to inflation is on line 99 of "main_ABC.m"

The inflation expectations series was taken from "Table 32: Expected Change in Prices During the Next Year" of the University of Michigan's Survey of Consumers. 
	The mean inflation expectations series used in the main analysis is in column C of the file "MICH.xlsx" 
	The median inflation expectations series used in the robustness analysis is in column B of the file "MICH.xlsx" 
	No transformations are required for this series.
 
[3] Software
All results were obtained using MATLAB, Version R2020a, Update 4 (9.8.0.1417392), 64-bit (win64) and the Statistics Toolbox.